<template>
  <div id="app">
    <button @click="show = true">显示</button>
    <!-- <el-dialog title="对话框" :visible.sync="show" width="30%" >
      <el-table :data="tableData">
        <el-table-column label="id" prop="id"></el-table-column>
        <el-table-column label="标题" prop="title"></el-table-column> -->
      <!-- <span>这有一段话</span>
      <span slot="footer">
        <el-button @click="show = false">关闭</el-button>
        <el-button type="success" @click="handleOK">ok</el-button> -->
      <!-- </span> -->
      <!-- </el-table>
    </el-dialog> -->

    <el-dialog title="对话框" :visible.sync="show">
      <el-form :model="form">
        <el-form-item label="名字" label-width="100px">
          <el-input v-model="form.name"> </el-input>
        </el-form-item>

        <el-form-item label="下拉菜单" label-width="100px">
          <el-select v-model="form.selsctValue">
            <el-option v-for="item in options" :key="item.id" :lable="item.title" :value="item.id">

            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer">
        <el-button type="danger" @click="show=false">关闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "App",
  mounted() {},

  data: function () {
    return {
      show: false,
      tableData:[
        {
          id:"1",
          title:"标题1"
        },
        {
          id:"2",
          title:"标题2"
        },
        {
          id:"3",
          title:"标题3"
        },
        {
          id:"4",
          title:"标题4"
        },
      ],
      form:{
        name:"JJY",
        selectValue:"空的"
      },
      options:[
        {
          id:"1",
          title:"标题1"
        },
        {
          id:"2",
          title:"标题2"
        },
        {
          id:"3",
          title:"标题3"
        },
        {
          id:"4",
          title:"标题4"
        },
      ],
    };
  },
  methods: {
    handleOK: function () {
      this.show = false;
    },
  },
  components: {},
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
